<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="node_modules/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
    <input type="text" v-model="message">
</div>
<script>
   var  dataobj={
       message:"",

       name:"柯震南",
       age:21
   };



    var vm = new Vue({
        el:"#app",
       data:dataobj,
        watch:{
            message(newVal,oldVal){
                console.log(newVal,oldVal);
            }
        }




    })

</script>


</body>
</html>